package handler

import (
	"github.com/gin-gonic/gin"
	"notabug.org/BigWaffleMonster/tg-bot/pkg/service"
)

type Handler struct {
	service *service.Service
}

func NewHandler(service *service.Service) *Handler {
	return &Handler{service: service}
}

func (h *Handler) InitRoutes() *gin.Engine {
	router := gin.New()

	encrypt := router.Group("/encrypt")
	{
		encrypt.POST("/", h.encryptData)
		encrypt.POST("/decrypt", h.decryptData)
	}

	register := router.Group("/register", h.registerServise)
	{
		register.POST("/")
	}

	return router
}
